
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>核心接口 · smartboot 中文指南</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="3-enum.html" />
    
    
    <link rel="prev" href="1-ready.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"smartboot","repo":"smart-socket","type":"star","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    关于smartboot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    smart-socket 使用手册
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../quickStart.html">
            
                <a href="../quickStart.html">
            
                    
                    快速上手
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" >
            
                <span>
            
                    
                    源码篇
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1" data-path="1-ready.html">
            
                <a href="1-ready.html">
            
                    
                    准备工作
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.3.2" data-path="2-core-interface.html">
            
                <a href="2-core-interface.html">
            
                    
                    核心接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.3" data-path="3-enum.html">
            
                <a href="3-enum.html">
            
                    
                    枚举状态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.4" data-path="4-IoServerConfig.html">
            
                <a href="4-IoServerConfig.html">
            
                    
                    服务配置IoServerConfig
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.5" data-path="5-AioQuickServer.html">
            
                <a href="5-AioQuickServer.html">
            
                    
                    服务端AioQuickServer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.6" data-path="6-AioQuickClient.html">
            
                <a href="6-AioQuickClient.html">
            
                    
                    客户端AioQuickClient
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.7" data-path="7-AioSession.html">
            
                <a href="7-AioSession.html">
            
                    
                    通信会话AioSession
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.8" data-path="8-CompletionHandler.html">
            
                <a href="8-CompletionHandler.html">
            
                    
                    读写回调
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.4" >
            
                <span>
            
                    
                    进阶篇
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="../second/readme.html">
            
                <a href="../second/readme.html">
            
                    
                    开篇概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="../second/2-decoder.html">
            
                <a href="../second/2-decoder.html">
            
                    
                    协议解码器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.3" data-path="../second/3-type-one.html">
            
                <a href="../second/3-type-one.html">
            
                    
                    一类消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.4" data-path="../second/4-type-two.html">
            
                <a href="../second/4-type-two.html">
            
                    
                    二类消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.5" data-path="../second/5-type-three.html">
            
                <a href="../second/5-type-three.html">
            
                    
                    三类消息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.5" >
            
                <a target="_blank" href="https://smartboot.github.io/smart-socket/apidocs/index.html">
            
                    
                    API Docs
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    smart-ioc 使用手册
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    smart-boot 使用手册
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    mydalgen 使用手册
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    技术分享
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../share/rpc/smart-socket-rpc.html">
            
                <a href="../../share/rpc/smart-socket-rpc.html">
            
                    
                    smart-socket实现RPC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../share/exception/readme.html">
            
                <a href="../../share/exception/readme.html">
            
                    
                    Exception杂谈
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../donation.html">
            
                <a href="../../donation.html">
            
                    
                    关于捐赠
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >核心接口</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x4E8C;&#x3001;&#x6838;&#x5FC3;&#x63A5;&#x53E3;">&#x4E8C;&#x3001;&#x6838;&#x5FC3;&#x63A5;&#x53E3;</h1>
<p>&#x4F5C;&#x4E3A;&#x4E00;&#x6B3E;&#x6846;&#x67B6;&#xFF0C;&#x9700;&#x8981;&#x5177;&#x5907;&#x652F;&#x6301;&#x5404;&#x7C7B;&#x4E1A;&#x52A1;&#x573A;&#x666F;&#x7684;&#x80FD;&#x529B;&#xFF0C;&#x4F46;&#x6846;&#x67B6;&#x672C;&#x8EAB;&#x53C8;&#x65E0;&#x6CD5;&#x77E5;&#x6653;&#x5B9E;&#x9645;&#x4E1A;&#x52A1;&#x573A;&#x666F;&#x5982;&#x4F55;&#xFF0C;&#x56E0;&#x6B64;&#x9700;&#x8981;&#x8BBE;&#x8BA1;&#x4E00;&#x5957;&#x6269;&#x5C55;&#x6027;&#x5F3A;&#x4E14;&#x4F18;&#x96C5;&#x7684;&#x63A5;&#x53E3;&#x3002;smart-socket&#x4E2D;&#x6838;&#x5FC3;&#x7684;&#x63A5;&#x53E3;&#x4EC5;3&#x4E2A;&#xFF0C;&#x7528;&#x6237;&#x5728;&#x4F7F;&#x7528;smart-socket&#x8FDB;&#x884C;&#x4E8C;&#x6B21;&#x5F00;&#x53D1;&#x65F6;&#xFF0C;&#x4E5F;&#x53EA;&#x9700;&#x719F;&#x7EC3;&#x638C;&#x63E1;&#x8FD9;&#x4E09;&#x4E2A;&#x63A5;&#x53E3;&#x7684;&#x8FD0;&#x7528;&#x5373;&#x53EF;&#x3002;</p>
<h2 id="protocol">Protocol</h2>
<pre><code>public interface Protocol&lt;T&gt; {

    public T decode(final ByteBuffer data, AioSession&lt;T&gt; session, boolean eof);

    public ByteBuffer encode(T msg, AioSession&lt;T&gt; session);
}
</code></pre><p>Protocol&#x662F;&#x4E00;&#x4E2A;&#x6CDB;&#x578B;&#x63A5;&#x53E3;&#xFF0C;<code>&lt;T&gt;</code>&#x6307;&#x7684;&#x662F;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#x5B9E;&#x4F53;&#x7C7B;&#xFF0C;smart-socket&#x4E2D;&#x4E0D;&#x5C11;&#x5730;&#x65B9;&#x90FD;&#x8FD0;&#x7528;&#x4E86;&#x6CDB;&#x578B;&#x8BBE;&#x8BA1;&#xFF0C;&#x5176;&#x542B;&#x4E49;&#x90FD;&#x4EE3;&#x8868;&#x6D88;&#x606F;&#x7C7B;&#x578B;&#x3002;Protocol&#x5B9A;&#x4E49;&#x4E86;&#x6D88;&#x606F;&#x7F16;&#x89E3;&#x7801;&#x7684;&#x63A5;&#x53E3;&#xFF0C;&#x6211;&#x4EEC;&#x5148;&#x6765;&#x4E86;&#x89E3;&#x4E00;&#x4E0B;&#x5176;&#x4E2D;&#x7684;&#x4E24;&#x4E2A;&#x65B9;&#x6CD5;<code>decode</code>&#x3001;<code>encode</code>&#x3002;</p>
<ul>
<li>decode<br>&#x6D88;&#x606F;&#x89E3;&#x7801;&#xFF0C;AIO&#x7684;&#x6570;&#x636E;&#x4F20;&#x8F93;&#x662F;&#x4EE5;ByteBuffer&#x4E3A;&#x5A92;&#x4ECB;&#x7684;&#x3002;&#x5728;&#x8BFB;&#x53D6;&#x5230;&#x6570;&#x636E;&#x5E76;&#x586B;&#x5145;&#x5230;ByteBuffer&#x540E;&#xFF0C;smart-socket&#x4F1A;&#x8C03;&#x7528;Protocol&#x5B9E;&#x73B0;&#x7C7B;&#x7684;decode&#x65B9;&#x6CD5;&#xFF0C;&#x5E76;&#x5C06;ByteBuffer&#x4F5C;&#x4E3A;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;&#x4F20;&#x5165;&#xFF0C;&#x800C;&#x7B2C;&#x4E8C;&#x4E2A;&#x53C2;&#x6570;AioSession&#x4E3A;&#x5F53;&#x524D;Socket&#x8FDE;&#x63A5;&#x7684;&#x4F1A;&#x8BDD;&#x5BF9;&#x8C61;&#xFF0C;&#x540E;&#x7EED;&#x4F1A;&#x8BE6;&#x89E3;&#x3002;<br>Protocol&#x5B9E;&#x73B0;&#x7C7B;&#x4ECE;ByteBuffer&#x4E2D;&#x8BFB;&#x53D6;&#x5B57;&#x8282;&#x5E76;&#x6309;&#x5176;&#x534F;&#x8BAE;&#x89C4;&#x5219;&#x8FDB;&#x884C;&#x6D88;&#x606F;&#x89E3;&#x7801;&#xFF0C;&#x5F85;&#x89E3;&#x7801;&#x5B8C;&#x6210;&#x540E;&#x5C01;&#x88C5;&#x6210;&#x4E1A;&#x52A1;&#x5BF9;&#x8C61;&#x5E76;&#x8FD4;&#x56DE;&#x3002;&#x4E0D;&#x8FC7;&#x5B9E;&#x9645;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x5DF2;&#x8BFB;&#x53D6;&#x5230;&#x5E76;&#x4F20;&#x5165;ByteBuffer&#x7684;&#x5B57;&#x8282;&#x53EF;&#x80FD;&#x4E0D;&#x8DB3;&#x4EE5;&#x5B8C;&#x6210;&#x6D88;&#x606F;&#x89E3;&#x7801;&#xFF08;&#x5373;&#x6240;&#x8C13;&#x7684;&#xFF1A;&#x534A;&#x5305;/&#x62C6;&#x5305;&#xFF09;&#xFF0C;Protocol&#x5B9E;&#x73B0;&#x7C7B;&#x53EF;&#x6839;&#x636E;&#x5176;&#x5B9E;&#x9645;&#x60C5;&#x51B5;&#x9009;&#x62E9;&#x90E8;&#x5206;&#x89E3;&#x7801;&#x6216;&#x7B49;&#x5F85;ByteBuffer&#x8DB3;&#x4EE5;&#x5B8C;&#x6210;&#x89E3;&#x7801;&#x540E;&#x518D;&#x6267;&#x884C;&#x89E3;&#x7801;&#x64CD;&#x4F5C;&#xFF0C;&#x4E0D;&#x8FC7;&#x5728;&#x6D88;&#x606F;&#x672A;&#x5B8C;&#x6210;&#x89E3;&#x7801;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x5FC5;&#x987B;&#x8FD4;&#x56DE;<code>null</code>&#x3002;</li>
<li>encode<br>&#x6D88;&#x606F;&#x7F16;&#x7801;&#xFF0C;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#x5728;&#x8F93;&#x51FA;&#x81F3;&#x7F51;&#x7EDC;&#x5BF9;&#x7AEF;&#x524D;&#xFF0C;&#x9700;&#x8981;&#x5C06;&#x5176;&#x7F16;&#x7801;&#x6210;&#x5B57;&#x8282;&#x6D41;&#xFF0C;&#x4E5F;&#x662F;&#x4EE5;ByteBuffer&#x4E3A;&#x8F7D;&#x4F53;&#x7684;&#x3002;&#x8BE5;&#x65B9;&#x6CD5;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;&#x6CDB;&#x578B;<code>T</code>&#x4FBF;&#x662F;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#x5BF9;&#x8C61;&#x3002;Protocol&#x7684;&#x5B9E;&#x73B0;&#x7C7B;&#x4E5F;&#x5F97;&#x6309;&#x7167;&#x4E1A;&#x52A1;&#x89C4;&#x5219;&#xFF0C;&#x5C06;T&#x6307;&#x4EE3;&#x7684;&#x5BF9;&#x8C61;&#x8F6C;&#x4E3A;ByteBuffer&#x5E76;&#x8FD4;&#x56DE;&#xFF0C;smart-socket&#x4F1A;&#x5C06;&#x7F16;&#x7801;&#x540E;&#x7684;ByteBuffer&#x8F93;&#x51FA;&#x3002;</li>
</ul>
<hr>
<h4 id="messageprocessor">MessageProcessor</h4>
<pre><code>public interface MessageProcessor&lt;T&gt; {

    public void process(AioSession&lt;T&gt; session, T msg);

    void stateEvent(AioSession&lt;T&gt; session, StateMachineEnum stateMachineEnum, Throwable throwable);
}
</code></pre><p>MessageProcessor&#x5B9A;&#x4E49;&#x4E86;&#x6D88;&#x606F;&#x5904;&#x7406;&#x5668;&#x63A5;&#x53E3;&#xFF0C;smart-socket&#x5728;&#x901A;&#x8FC7;Protocol&#x5B8C;&#x6210;&#x6D88;&#x606F;&#x89E3;&#x7801;&#x540E;&#xFF0C;&#x4F1A;&#x5C06;&#x6D88;&#x606F;&#x5BF9;&#x8C61;&#x4EA4;&#x7531;MessageProcessor&#x5B9E;&#x73B0;&#x7C7B;&#x8FDB;&#x884C;&#x4E1A;&#x52A1;&#x5904;&#x7406;&#x3002;</p>
<ul>
<li>process<br>&#x6D88;&#x606F;&#x5904;&#x7406;&#x5668;&#xFF0C;smart-socket&#x6BCF;&#x63A5;&#x6536;&#x5230;&#x4E00;&#x4E2A;&#x5B8C;&#x6574;&#x7684;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#xFF0C;&#x90FD;&#x4F1A;&#x4EA4;&#x7531;&#x8BE5;&#x5904;&#x7406;&#x5668;&#x6267;&#x884C;&#x3002;</li>
<li>stateEvent<br>&#x6267;&#x884C;&#x72B6;&#x6001;&#x673A;&#xFF0C;smart-socket&#x5185;&#x7F6E;&#x4E86;&#x72B6;&#x6001;&#x679A;&#x4E3E;<code>StateMachineEnum</code>&#x3002;<code>MessageProcessor</code>&#x5B9E;&#x73B0;&#x7C7B;&#x53EF;&#x5728;&#x6B64;&#x65B9;&#x6CD5;&#x4E2D;&#x5904;&#x7406;&#x5176;&#x5173;&#x6CE8;&#x7684;&#x4E8B;&#x4EF6;&#x3002;</li>
</ul>
<hr>
<h4 id="filter">Filter</h4>
<p><code>Filter</code>&#x662F;&#x6846;&#x67B6;&#x63D0;&#x4F9B;&#x7684;&#x901A;&#x4FE1;&#x5C42;&#x8FC7;&#x6EE4;&#x5668;&#x63A5;&#x53E3;&#xFF0C;&#x7528;&#x6237;&#x53EF;&#x57FA;&#x4E8E;&#x8BE5;&#x63A5;&#x53E3;&#x5F00;&#x53D1;&#x4E00;&#x4E9B;&#x6269;&#x5C55;&#x6027;&#x670D;&#x52A1;&#x3002;&#x8FD9;&#x4E2A;&#x63A5;&#x53E3;&#x4E0D;&#x5E38;&#x7528;&#xFF0C;&#x4F46;&#x5229;&#x7528;&#x7684;&#x597D;&#x7684;&#x8BDD;&#x53EF;&#x4EE5;&#x5E2E;&#x52A9;&#x4F60;&#x83B7;&#x6089;&#x670D;&#x52A1;&#x5668;&#x7684;&#x8FD0;&#x884C;&#x72B6;&#x51B5;&#x3002;</p>
<pre><code>public interface Filter&lt;T&gt; {

    public void readFilter(AioSession&lt;T&gt; session, int readSize);

    public void processFilter(AioSession&lt;T&gt; session, T msg);

    public void processFailHandler(AioSession&lt;T&gt; session, T msg, Throwable e);

    public void writeFilter(AioSession&lt;T&gt; session, int writeSize);

}
</code></pre><ul>
<li>readFilter<br>&#x8BFB;&#x64CD;&#x4F5C;&#x8FC7;&#x6EE4;&#xFF0C;&#x6BCF;&#x5F53;smart-socket&#x53D1;&#x751F;&#x8BFB;&#x64CD;&#x4F5C;&#x4FBF;&#x4F1A;&#x89E6;&#x53D1;&#x8BE5;&#x65B9;&#x6CD5;&#x3002;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;AioSession&#x4E3A;&#x672C;&#x6B21;&#x53D1;&#x751F;&#x8BFB;&#x4E8B;&#x4EF6;&#x7684;&#x4F1A;&#x8BDD;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x53C2;&#x6570;readSize&#x4E3A;&#x672C;&#x6B21;&#x8BFB;&#x53D6;&#x5230;&#x7684;&#x5B57;&#x8282;&#x6570;</li>
<li>processFilter<br>&#x6D88;&#x606F;&#x5904;&#x7406;&#x8FC7;&#x6EE4;&#x5668;&#xFF0C;&#x6BCF;&#x4E00;&#x4E2A;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#x5728;&#x6267;&#x884C;<code>MessageProcessor.process</code>&#x4E4B;&#x524D;&#x90FD;&#x4F1A;&#x5148;&#x6267;&#x884C;&#x4E00;&#x904D;<code>Filter.processFilter</code></li>
<li>processFailHandler<br>&#x5F53;&#x4E1A;&#x52A1;&#x6D88;&#x606F;&#x6267;&#x884C;<code>processFilter</code>&#x51FA;&#x73B0;&#x8FD0;&#x884C;&#x65F6;&#x5F02;&#x5E38;&#x65F6;&#xFF0C;&#x4F1A;&#x89E6;&#x53D1;<code>processFailHandler</code></li>
<li>writeFilter<br>&#x5199;&#x64CD;&#x4F5C;&#x8FC7;&#x6EE4;&#xFF0C;&#x6BCF;&#x5F53;smart-socket&#x53D1;&#x751F;&#x5199;&#x64CD;&#x4F5C;&#x4FBF;&#x4F1A;&#x89E6;&#x53D1;&#x8BE5;&#x65B9;&#x6CD5;&#x3002;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;AioSession&#x4E3A;&#x672C;&#x6B21;&#x53D1;&#x751F;&#x5199;&#x4E8B;&#x4EF6;&#x7684;&#x4F1A;&#x8BDD;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x53C2;&#x6570;writeSize&#x4E3A;&#x672C;&#x6B21;&#x8F93;&#x51FA;&#x7684;&#x5B57;&#x8282;&#x6570;<blockquote>
<p>smart-socket&#x7684;&#x8FD0;&#x884C;&#x5E76;&#x975E;&#x5F3A;&#x4F9D;&#x8D56;Filter&#xFF0C;&#x56E0;&#x6B64;&#x7528;&#x6237;&#x672A;&#x5B9A;&#x4E49;Filter&#x4E5F;&#x4E0D;&#x4F1A;&#x5F71;&#x54CD;&#x4F7F;&#x7528;&#xFF0C;&#x8BE5;&#x63A5;&#x53E3;&#x53EA;&#x662F;&#x6846;&#x67B6;&#x7684;&#x4E00;&#x9879;&#x9644;&#x52A0;&#x529F;&#x80FD;&#x3002;</p>
</blockquote>
</li>
</ul>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; smartboot.org 2018 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-06-17 18:35:22
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="1-ready.html" class="navigation navigation-prev " aria-label="Previous page: 准备工作">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="3-enum.html" class="navigation navigation-next " aria-label="Next page: 枚举状态">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"核心接口","level":"1.2.3.2","depth":3,"next":{"title":"枚举状态","level":"1.2.3.3","depth":3,"path":"smart-socket/first/3-enum.md","ref":"smart-socket/first/3-enum.md","articles":[]},"previous":{"title":"准备工作","level":"1.2.3.1","depth":3,"path":"smart-socket/first/1-ready.md","ref":"smart-socket/first/1-ready.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","-sharing","search-plus","expandable-chapters-interactive","tbfed-pagefooter","github","github-buttons","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy smartboot.org 2018","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://github.com/smartboot/smart-socket"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"expandable-chapters-interactive":{},"github-buttons":{"buttons":[{"user":"smartboot","repo":"smart-socket","type":"star","size":"small","count":true}]},"edit-link":{"label":"Edit This Page","base":"https://gitee.com/smartboot/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"smartboot 中文指南","language":"en","gitbook":"*","description":"本文涵盖了smartboot下所有项目的技术手册"},"file":{"path":"smart-socket/first/2-core-interface.md","mtime":"2018-06-17T10:35:22.013Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-09-23T08:59:34.607Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

